package com.sam.im.heiqun.constant;

import android.os.Environment;

import com.sam.im.heiqun.nets.PGApi;

/**
 * 常量
 * Created by Joe on 2017/1/2.
 */

public class Constant {

    /**
     * 扫描类型
     * 条形码或者二维码：REQUEST_SCAN_MODE_ALL_MODE
     * 条形码： REQUEST_SCAN_MODE_BARCODE_MODE
     * 二维码：REQUEST_SCAN_MODE_QRCODE_MODE
     */
    public static final String REQUEST_SCAN_MODE = "ScanMode";
    /**
     * 条形码： REQUEST_SCAN_MODE_BARCODE_MODE
     */
    public static final int REQUEST_SCAN_MODE_BARCODE_MODE = 0X100;
    /**
     * 二维码：REQUEST_SCAN_MODE_ALL_MODE
     */
    public static final int REQUEST_SCAN_MODE_QRCODE_MODE = 0X200;
    /**
     * 条形码或者二维码：REQUEST_SCAN_MODE_ALL_MODE
     */
    public static final int REQUEST_SCAN_MODE_ALL_MODE = 0X300;

    //    public static final String BASE = "http://oa.hewenjun.cn/wmsMobile/";
//    public static final String BASE = "http://123.57.47.19/";
    public static final String BASE = PGApi.getPayPalUrl;

    public static final String register = BASE + "/chat/register";

    public static final int SENDING = 0;//消息发送中
    public static final int COMPLETED = 1;//消息发送成功
    public static final int SENDERROR = 2;//消息发送失败

    public static final int RunnableTime = 1000 * 10;//10秒钟

    public static final String MOBILE = "mobile";
    public static final String PWD = "pwd";
    public static final String PWD_SIMPLE = "pwdSimple";
    public static final String MOBILE_SIMPLE = "mobileSimple";
    public static final String NEED_AUTH = "needauth";
    public static final String SEARCH_MOBILE = "searchmobile";
    public static final String NEW_NOTIFICTION = "newnotifiction";
    public static final String CITY = "city";
    public static final String PROVINCE = "province";
    public static final String NICKNAME = "nickname";
    public static final String SEX = "sex";
    public static final String SIGN = "sign";
    public static final String HEAD_IMG = "headimg";
    public static final String USER_ID = "userid";
    public static final String NEW_REGISTER = "newregister";
    public static final String IS_FIRST = "is_first";


    public static final int MESSAGE_TYPR_READY = 1;//客户端确认收到ready回应，并且处理完好友列表时，发送给服务器
    public static final int MESSAGE_TYPR_TEXT = 2;//文本及表情消息
    public static final int MESSAGE_TYPR_IMAGE = 3;//图片
    public static final int MESSAGE_TYPR_FILE = 4;//文件
    public static final int MESSAGE_TYPR_FIREND_ONLION = 5;//好友上线
    public static final int MESSAGE_TYPR_FRIEND_OFFLION = 6;//好友离线
    public static final int MESSAGE_TYPR_BYE_FRIEND = 7;//解除好友
    public static final int MESSAGE_TYPR_ADD_GROUP = 8;//有人加群
    public static final int MESSAGE_TYPR_BYE_GROUP = 9;//有人退群
    public static final int MESSAGE_TYPR_INVITE_GROUP = 10;//被邀请加群
    public static final int MESSAGE_TYPR_APPLY_FRIEND = 11;//有人申请加好友
    public static final int MESSAGE_TYPR_APPLE_ADD_FRIEND_AGREE = 12;//申请加好友通过
    public static final int MESSAGE_TYPR_APPLE_GROUP = 13;//有人申请加入群
    public static final int MESSAGE_TYPR_APPLY_GROUP_AGREE = 14;//申请加入群通过
    public static final int MESSAGE_TYPR_OTHER_LOGIN = 15;//账户从其它地方登陆
    public static final int MESSAGE_TYPR_VOICE = 16;//离线语音
    public static final int MESSAGE_TYPR_REDPACKTE = 17;//有红包
    public static final int MESSAGE_TYPR_TRANSFRE = 18;//有人转账给我，接受转账
    public static final int MESSAGE_TYPR_GET_REDPACKET = 19;//红包被领取的通知
    public static final int MESSAGE_TYPR_TRANSFRE_OK = 20;//确认转账，收钱
    public static final int MESSAGE_TYPR_TRANSFRE_BACK = 21;//转账退回
    public static final int MESSAGE_TYPR_REDPACKET_BACK = 22;//红包退回
    public static final int MESSAGE_TYPR_FRIEND_ADD = 23;//自动添加好友成功
    public static final int MESSAGE_TYPR_REDPACKET_NOFINISH = 24;//群里红包被抢光
    public static final int MESSAGE_TYPR_GROUP_CHANGE = 25;//群名称修改
    public static final int MESSAGE_TYPR_GROUP_CHANGE_UNAME = 27;//群成员昵称有修改
    public static final int MESSAGE_TYPR_LOCATION = 29;//位置信息
    public static final int MESSAGE_TYPR_VEDIO = 30;//小视屏
    public static final int MESSAGE_TYPR_WITHDRAW = 32;// 消息撤回
    public static final int MESSAGE_TYPR_READ = 33;//单人消息已读
    public static final int MESSAGE_TYPR_BQEMOJI = 34; // 表情云消息 包含文本内容
    public static final int MESSAGE_TYPR_CIRCLE = 36;//有好友发布了朋友圈
    public static final int MESSAGE_TYPR_CIRCLE_COMMON = 37;//有好友评论了你的朋友圈
    public static final int MESSAGE_TYPR_CIRCLE_PRASIE = 38;// 赞了或者评论了
    public static final int MESSAGE_TYPR_TRANSFOR_ISCOME = 39;//收款到账
    public static final int MESSAGE_TYPR_AAMONEY_GET = 40;//有人发起AA收款
    public static final int MESSAGE_TYPR_TRANSFOR_TOPAY = 41;//有人要求你付款
    public static final int MESSAGE_TYPR_TOPAYFOR = 1111111; //我的付款消息
    public static final int MESSAGE_TYPR_CALL_VOICE_FROM = 42;//语音通话请求
    public static final int MESSAGE_TYPR_CALL_VOICE_AS = 43;//语音通话反馈
    public static final int MESSAGE_TYPR_CALL_VIDEO_FROM = 44; //视屏通话请求
    public static final int MESSAGE_TYPR_CALL_VIDEO_AS = 45; //视屏通话反馈
    public static final int MESSAGE_TYPR_READ_DELETE = 31;//阅后即焚
    public static final int MESSAGE_TYPR_CANCLE_CALLVIDEO = 50;//取消视屏通话
    public static final int MESSAGE_TYPR_CALL_OFFER = 47; // offer ;//20170818-现在这个表示：群公告新建
    public static final int MESSAGE_TYPR_CALL_ANSWER = 48; // offer ;//20170818-现在这个表示：群公告编辑
    public static final int MESSAGE_TYPR_CALL_ICE = 49; // offer ;//现在这个表示，朋友圈中有人艾特你
    public static final int MESSAGE_TYPR_CHANGE_GROUP_HEAD = 46; // 更换群头像
    public static final int MESSAGE_TYPR_FRIEND_HEAD = 28; // 名片
    public static final int MESSAGE_TYPR_GROUP_SET_MANAGER = 55; // 设置管理员
    public static final int MESSAGE_TYPR_GROUP_CANCEL_MANAGER = 57; // 取消管理员
    public static final int MESSAGE_TYPR_GROUP_BRIFE = 56; // 群组更新群介绍
    public static final int MESSAGE_TYPR_GROUP_DISMISS = 51; // 群主解散了群组通知dismiss
    public static final int MESSAGE_TYPR_GROUP_TRANS_ME = 52; // 转让群的通知（转让给当前用户）trans
    public static final int MESSAGE_TYPR_GROUP_TRANS_AGREE = 53; // 群主收到转让同意通知
    public static final int MESSAGE_TYPR_GROUP_TRANS_UNAGREE = 54; // 群主收到转让拒绝通知
    public static final int MESSAGE_TYPE_INVATE_JOIN_GROUP = 67;// 邀请加群
    public static final int MESSAGE_TYPE_BE_JOIN_GROUP=66;// 通知已经被拉进群

    public static final int MESSAGE_TYPE_AGREE_FRIEND_APPLY=3000;// 我同意了好友请求（本地自定义消息类型）

    public static final int MESSAGE_GROUP_ADD_APPLY = 59; // 加群申请
    public static final int NOTICE_OF_GROUP_REQUEST_YES=60;// 同意加群
    public static final int NOTICE_OF_GROUP_REQUEST_NO=61;// 拒绝加群
    public static final int NOTICE_OF_GROUP_SILENCE_YES=62;// 禁言成功
    public static final int NOTICE_OF_GROUP_SILENCE_NO=63;// 取消禁言
    public static final int NOTICE_OF_GROUP_LEVEL_NO=58;// 群到期
    public static final int NOTICE_OF_GROUP_OUT=64;// 被踢出群组
    public static final int NOTICE_OF_MONEY_ADD_FOR_JOIN_GROUP = 69;// 通知余额增加（付费进群）
    public static final int NOTICE_OF_MONEY_REDUCE_JOIN_GROUP = 70;// 通知余额减少（付费进群）
    public static final int NOTICE_OF_APPLY_FRIEND = 71;// 有人申请加好友（带一句话的）

    public static final int NOTICE_whole_OF_GROUP_SILENCE_YES=72;//全体禁言成功
    public static final int NOTICE_whole_OF_GROUP_SILENCE_NO=73;//全体取消禁言
    public static final int BLACKLIST_MESSAGE_NOTIFICATION=74;//设置黑名单
    public static final int CANCEL_BLACKLIST_MESSAGE_NOTIFICATION=75;//取消黑名单
    public static final int MSG_OF_FREEZE=76;//账号被冻结
    public static final int Someone_initiated_the_lucky_red_envelope=80;//幸运红包

    public static final int FROM_TYPE_MAM = 1;//单人聊天
    public static final int FROM_TYPE_GROUP = 2;//群聊
    public static final int FROM_TYPE_SYS = 3;//系统通知

    public static final int TOP_MAN = 1;//私聊置顶
    public static final int TOP_NOT_MAN = 0;//私聊不置顶

    public static final int ACCEPT_MSG = 0; //消息免打扰  群和私聊通用

    public static final int FROM_TYPE_SELF = 1;//自己发送消息
    public static final int FROM_TYPE_OTHER = 2;//接受消息

    public static final int VERSION_MESSAGE_CHART = 1;//聊天的版本信息
    public static final int DEV_TYPE = 1;//1：安卓，2：ios，3：pc


    public static final String EVENT = "chat";//

    public static final String MAX_UNREAD_NUM = "99+";//账户从其它地方登陆

    // 本机对象文件名称
    public final static String LOGIN_RECEIVE_DATA = "loginReceiveData.dat";

    public final static String BLACK_BROADCAST_FOUND_REFRESH = "1001";


    public final static int BLACK_BROADCAST_MESSAGE_REFRESH = 1002;//清除被删除的好友，然后刷新界面
    public final static int MAIN_BOTTOM_TIP_NUM = 1003;//告诉MainActivity更新消息个数提示
    public final static int BLACK_MESSAGE_REFRESH = 1004;//告诉messageframent刷新界面
    public final static int ADAPTER_VOICE_FROM_DOWN_FINISH = 1005;//告诉Adapter语音下载完成，开始播放
    public final static int MAIN_ACTIVITY_TO_LOGIN = 1006;//账户在其他地方登陆，本机退出登陆
    public final static int MESSAGE_UPDATE_LIST = 100;//群组页面刷新，群聊天页面更新
    public final static int MESSAGE_MAIN_GO_GROUP = 1007;//主页进入群组页面
    public final static int MESSAGE_MAIN_GO_GROUP_RESULT = 1008;//主页进入群组页面
    public final static int MESSAGE_GROUP_USERS_NAME_SHOW = 1009;//群聊天页面更新是否显示成员名称

    public final static String BLACK_BROADCAST_ADD_GROUP_FOUND_REFRESH = "1101";//新增群
    public final static int BLACK_BROADCAST_CLEAR_GROUP_MESSAGE_REFRESH = 1102;//清空群组信息
    public final static String BLACK_CLEAR_CHAT_MESSAGE_REFRESH = "1103";//清空私聊信息
    public final static String BLACK_CLEAR_GROUP_MESSAGE_REFRESH = "1104";//清空群聊信息
    public final static String BYB_FRIEND = "1105";//好友被解除

    public final static String NOT_NET = "1106";//没有网络
    public final static String NET = "1107";//网络
    public final static String NOT_NET_SERVICE = "1108";//服务器连接失败
    public final static String NET_SERVICE = "1109";//服务连接成功
    public final static String STOP_VOICE_PLAY = "1110";//停止语音播放
    public final static String CLOSE_CHAT_ACTIVITY = "1111";//关闭单聊界面
    public final static String CLOSE_CHAT_GROUP_ACTIVITY = "1112";//关闭群聊界面
    public final static String APP_DESTID_CHAT_ACTIVITY = "1113";//设置单聊界面app.destid
    public final static String APP_DESTID_CHAT_GROUP_ACTIVITY = "1114";//群聊界面设置app.destid
    public final static String FRAGMENT_HIND_TITLE = "1115";//连接成功以后发出通知
    public final static String FRAGMENT_FRIEND_REFRESH = "1116";//
    public final static String FRAGMENT_FRIEND_REFRESH_GROUP = "1117";//
    public final static String FILE_PATH = "com/ydyx/file";//下载的文件地址

    public final static int NET_STATE = 1;//有网络
    public final static int NOT_NET_STATE = 2;//无网络

    public final static String IS_BLACK = "1";//黑名单
    public final static String IS_NOT_BLACK = "0";//不是黑名单

    public final static String DEVICE = "1";//同意添加好友
    public final static int AGREE_ADD_FRIEND = 1;//同意添加好友
    public final static int IS_FRIEND = 2;//已经是好友
    public final static String NEW_NOTIFICTION_A = "1";//系统默认通知
    public final static String AGREE_ADD_FRIEND_N = "2";//系统默认不通知
    public final static String APK_URL = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/download";//系统默认不通知
    public final static int CHAT_MESSAGE_IMG_SIZE_SCALE = 3;//聊天界面的图片显示大小比例

    public final static String APP_NAME = "heiqun.apk";//应用名称

    public final static int SOCKET_SEND_TIME = 3000;//socket断网发送时间间隔

    public final static int NUMBER = 20;//好友和群，一次加载30人

    public final static String STAR_PLAY_VOICE = "11101";//开始播放语音
    public final static String STOP_PLAY_VOICE = "11102"; //语音播放结束
    public final static int VICEOSHOWVIDEO = 165;        //对方请求切换音频通话为视频
    public final static int SWICHVICEOSHOWVIDEO = 161;        //对方同意切换
    public final static int SWICHVICEOSHOWVIDEONO = 161;        //对方拒绝切换
    public final static int SWICHVICEOSHOWVIDEONOTIME = 162;        //通话时间
    public final static int SWICHVICEOSHOWVIDEONOTIMECANCLE = 163;        //取消通话
    public final static int SWICHVICEOSHOWVIDEONOTIMREFUSE = 164;        //拒绝通话
    public final static int SWICHVICEOSHOWVIDEONOTIMREFUSEEXXIT = 165;        //异常退出
    public final static int TOVIDEOTHREECALL = 166;        //异常退出
    public final static int TOVIDEOTHREECALLEXIT = 167;        //挂断通知

    public final static int TOMessageTypeVoiceRequest = 150;      //有人向你发起音频通话
    public final static int TOMessageTypeVideoRequest = 151;        //有人向你发起视频通话
    public final static int TOMessageTypeAgreeVoiceRequest = 152;        //同意对方音频通话
    public final static int TOMessageTypeAgreeVideoRequest = 153;        //同意对方音视频通话
    public final static int TOMessageTypeRefuseVoiceRequest = 154;        //拒绝对方音频通话
    public final static int TOMessageTypeRefuseVideoRequest = 155;      //拒绝对方音视频通话
    public final static int TOMessageTypeCancleVoiceVideo = 156;        //挂断对方音视频通话
    public final static int TOMessageTypeChangeVideoToVoiceRequest = 157;        //对方切换视频通话为音频
    public final static int TOMessageTypeChangeVoiceToVideoRequest = 158;        //对方请求切换音频通话为视频
    public final static int TOMessageTypeAgreeChangeVoiceToVideoRequest = 159;        //对方同意切换音频通话为视频
    public final static int TOMessageTypeRefuseChangeVoiceToVideoRequest = 160;        //对方拒绝切换音频通话为视频
    public final static int TOMessageTypeRefuseChangeVoiceTRYToVideoRequest = 161;        //异常退出通话

}
